<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>


<table id="news" lay-filter="test"></table>

<div id="wangEditor">
    <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
</div>



<script src="${pageContext.request.contextPath}/wangEditor/js/wangEditor.min.js"></script>
<script type="text/javascript">
    var E = window.wangEditor
    var editor = new E("#wangEditor")
    // 或者 const editor = new E(document.getElementById('div1'))

    // 配置 server 接口地址
    editor.config.uploadImgServer = '${pageContext.request.contextPath}/file/wangUpload';

    editor.config.uploadFileName = 'file'

    // 默认情况下，显示所有菜单
    editor.config.menus = [
        'head',
        'bold',
        'fontSize',
        'fontName',
        'italic',
        'underline',
        'strikeThrough',
        'indent',
        'lineHeight',
        'foreColor',
        'backColor',
        'link',
        'list',
        'todo',
        'justify',
        'quote',
        'emoticon',
        'image',
        // 'video',
        'table',
        'code',
        'splitLine',
        'undo',
        'redo',
    ]

    editor.create();

</script>
</body>
</html>
